program Main
use mpmodule

integer :: k,i = 1
type(mp_real) exact,sk,a
call mpinit(2000)

sk = sqrt(mpreal('0.5'))
call mpwrite(6,sk)
k=4
a = -1
exact = acos(a)

call mpwrite(6,exact)

do i =1,50
k = k*2
print*,k
sk = sqrt((sk/2)**2+(mpreal('0.5')-sqrt(mpreal('0.25')-(sk/2)**2))**2)
call mpwrite(6,(exact-k*sk)/exact)
enddo

end program
